from rest_framework.pagination import PageNumberPagination

class CustomPagination(PageNumberPagination):
    page_size = 10  # 默认每页显示数量
    page_size_query_param = 'page_size'  # 前端控制每页数量的参数名
    max_page_size = 100  # 每页最大显示数量